/**
 * This Java Class is part of the Impro-Visor Application
 *
 * Copyright (C) 2005-2009 Robert Keller and Harvey Mudd College
 *
 * Impro-Visor is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Impro-Visor is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * merchantability or fitness for a particular purpose.  See the
 * GNU General Public License for more details.
 *

 * You should have received a copy of the GNU General Public License
 * along with Impro-Visor; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

package imp.gui;

/**
 *
 * @author  keller
 */
public class HelpDialog extends javax.swing.JDialog {

    /** Creates new form HelpDialog */
    public HelpDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        helpTabbedPane = new javax.swing.JTabbedPane();
        helpByTopic = new javax.swing.JScrollPane();
        helpByTopicList = new javax.swing.JTextArea();
        alphaCommandPane = new javax.swing.JScrollPane();
        alphaCommandList = new javax.swing.JTextArea();
        melodyNotation = new javax.swing.JScrollPane();
        melodyNotationHelp = new javax.swing.JTextArea();
        chordListingPane = new javax.swing.JScrollPane();
        chordList = new javax.swing.JTextArea();
        lickGenSettingsPane = new javax.swing.JScrollPane();
        lickGenSettings = new javax.swing.JTextArea();
        styleHelpPane = new javax.swing.JScrollPane();
        styleHelpList1 = new javax.swing.JTextArea();
        drawingHelpPane = new javax.swing.JScrollPane();
        drawingHelp = new javax.swing.JTextArea();
        roadmapHelpPane = new javax.swing.JScrollPane();
        roadmapHelp = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(680, 800));
        setPreferredSize(new java.awt.Dimension(680, 800));
        getContentPane().setLayout(new java.awt.GridBagLayout());

        helpTabbedPane.setToolTipText("Alphabetic Listing of Key Commands");
        helpTabbedPane.setMinimumSize(new java.awt.Dimension(500, 700));
        helpTabbedPane.setPreferredSize(new java.awt.Dimension(600, 800));

        helpByTopic.setMinimumSize(new java.awt.Dimension(500, 800));
        helpByTopic.setPreferredSize(new java.awt.Dimension(600, 900));

        helpByTopicList.setColumns(20);
        helpByTopicList.setFont(new java.awt.Font("Lucida Console", 0, 13));
        helpByTopicList.setRows(5);
        helpByTopicList.setText("Impro-Visor Help By Topic\n\nWe give the key-stroke version of most commands. The menus can also be used to refresh your memory.\n\nGrid Lines:\n\n\tGrid lines indicate potential note, rest, and chord starting and ending points. \n\tGrid lines appear in a measure when the mouse is moved over it.\n\tMultiple adjacent grid lines may be selected.\n\tSome commands, such as Advice, only function if a single grid line is selected.\n\tIf one or more grid lines are selected, we call this \"the selection\".\n\nTo select a grid line, or to extend a selection:\n\n\tSelected grid lines are shown by high-lighting the line and any note on it.\n\n\tIf no grid line is already selected, shift-click on the desired grid line.\n\tIf a grid line is already selected, shift-click twice on the desired grid line.\n\n\tShift-clicking on a grid line inside the selection causes just that grid line to be selected.\n\tShift-clicking on a grid line outside the selection extends the selection to include that grid line.\n\tControl-a selects all grid lines at once.\n\tEscape unselects everything.\n\tIf a single grid line is selected, it can be moved back and forth using keys f and a.\n\nEntering notes:\n\n\tClick on the intersection of any grid line and staff line or space.\n\tAlternatively, notes can be entered in the text entry field using leadsheet notation.\n\tAccidentals:\n\t\tUse keys e and d to raise and lower notes by half step.\n\t\tUse the space bar to change an accidental enharmonically.\n\t\tUse keys t and g to raise and lower notes by octave.\n\tIf you make a mistake entering a note, just click another note on the same grid line.\n\tYou may also undo one or more note entry actions with key z.\n\tThe duration values of notes will be long when you first click.\n\tClick over the tied portion to enter the next note in a sequence.\n\tIf you want a rest, click a note or select a grid line, then press key r.\n\t\nRemoving notes:\n\n\tSelect the grid line that begins the note you want to remove. Then press either r or x.\n\tPressing r will replace the note with a rest.\n\tPressing x will remove the note, but extend the value of the previous note over it.\n\nExtending the duration of a note:\n\n\tIf the note to be extended is followed by a rest, select the grid line of that starts the rest,then press x.\n\nEntering chords:\n\n\tEnter the chord names in the text entry field, pressing enter when desired.\n\tChords will be entered starting at the first grid line selected.\n\tIf there is no grid line selected, nothing will happen.\n\tUse bars | to indicate measures.\n\tChords are spaced evenly within a measure. \n\tUse / to indicate more time for the previous chord.\n\tExample:\t| A B C / |\tmeans that C gets twice the value that A and B get.\n\tUse keys E and D to raise or lower a chord by half steps.\n\nCopying a selection:\n\n\tFirst create the selection by shift clicking as described above.\n\tPress c to copy the notes in the selection.\n\tPress C to copy the chords in the selection.\n\tPress control-c to copy both notes and chords.\n\tCopying takes place to a \"clip-board\" that is not visible.\n\tThe copied selection is not removed.\n\nPasting a selection:\n\n\tPasting is done from the invisible \"clip-board\" mentioned above.\n\tFirst select a single grid line.\n\tPress v to paste the notes previously copied or cut.\n\tPress V to paste the chords previously copied or cut.\n\tPress control-v to paste both notes and chords.\n\tThe selection can be pasted multiple times in different positions.\n\nCutting a selection:\n\n\tCutting is like copying, except the selection is removed as well.\n\tFirst create the selection by shift clicking as described above.\n\tPress x to copy the notes in the selection.\n\tPress X to copy the chords in the selection.\n\tPress control-x to copy both notes and chords.\n\tBoth cut and copy put notes and chords into the \"clip-board\".\n\nUndoing a paste or cut:\n\n\tUse key z to undo.\n\tMultiple undos are allowed.\n\tUse key y to redo something you just undid.\n\nPasting from the text entry field:\n\n\tBoth chords and notes can be entered through the text entry field.\n\tPressing return enters the contents at the current selection.\n\tOne can also select a grid line then re-enter the text entry items at that point as follows:\n\t\tPress b to enter the notes only.\n\t\tPress B to enter the chords only.\n\t\tPress control-b to enter both notes and chords.\n\nCopying a selection from the staff to the text entry:\n\n\tThis is a good way to learn leadsheet notation.\n\tCreate a selection.\n\tPress j to copy the notes in the selection to the text entry.\n\tPress J to copy the chords in the selection to the text entry.\n\tPress control-j to copy the notes and chords in the selection to the text entry.\n\nTransposing an entire selection:\n\n\tUse d to transpose selected notes down 1/2 step.\n \tUse D to transpose selected chords down 1/2 step.\n\tUse control-d to transpose selected notes and chords down 1/2 step.\n\tUse g to transpose selected notes down an octave.\n\tUse s to transpose selected notes down harmonically about 1/2 step.\n\n\tUse e to transpose selected notes up 1/2 step.\n \tUse E to transpose selected chords up 1/2 step.\n\tUse control-e to transpose selected notes and chords up 1/2 step.\n\tUse t to transpose selected notes up an octave.\n\tUse w to transpose selected notes up harmonically about 1/2 step.\n\nPlaying a selection or the entire piece:\n\n\tWith the mouse in the staff window, press enter to play the selection (notes and chords).\n\tPress shift-enter to play from the selection to the end of the leadsheet.\n\tPress i to play the entire leadsheet.\n\tPress k to stop playback.\n \nSaving licks, cells, idioms, or quotes:\n\n\tSelect what you want to save.\n\tPress u. A dialog will open that allows you to select the type and name the item.\n\nMarking and unmarking licks, cells, idioms, or quotes:\n\n\tMarking allows you to find the marked item in the vocabulary file using a text editor.\n\tUse M to mark a lick, cell, idiom, or quote.\n\tUse m to unmark an already-marked item.\n\nOther composer functions:\n\n\tUse R to rectify (align to harmony) the notes in the selected  melody.\n\tUse / to reverse the notes in the selected  melody.\n\tUse \\ to invert the notes in the selected melody.\n\nLeadsheet file commands:\n\n\tUse control-o to open an existing leadsheet.\n\tUse control-s to save the current leadsheet under the same name.\n\tUse control-w to save the current leadsheet under a new name.\n\tUse control-r to revert the leadsheet to the last saved version. Changes since then are lost.\n\tUse control-n to open a new leadsheet. The current one stays in its own window.\n\nMiscellaneous:\n\tUse control-l to perform a one-time auto-layout adjustment of the measures per line.\n\tTo set a specific number of measures per line: shift click on the line, then select \"Over-ride ... \".\n\tControl-q quits improvisor.\n\n\n");
        helpByTopic.setViewportView(helpByTopicList);

        helpTabbedPane.addTab("Topics", helpByTopic);

        alphaCommandPane.setMinimumSize(new java.awt.Dimension(500, 800));
        alphaCommandPane.setPreferredSize(new java.awt.Dimension(600, 900));

        alphaCommandList.setColumns(20);
        alphaCommandList.setFont(new java.awt.Font("Lucida Console", 0, 13));
        alphaCommandList.setRows(5);
        alphaCommandList.setText("Impro-Visor Key Bindings Alphabetically (^ means hold control key)\n\nNote: Key commands are case-sensitive.\n\nescape\tUnselect everything, also stop playback if playing.\n\nenter\t\tPlay selection.\nshift-Enter\tPlay from selection to end of sheet.\n\nspace\tToggle enharmonic notes in selection.\n\na\tMove selection backward to previous grid line.\n^a\tSelect all chords and melody.\n\n b\tEnter melody from text entry field.\n B\tEnter chords from text entry field.\n^b\tEnter melody and chords from text entry field.\n\n c\tCopy melody in selection to clipboard.\n C\tCopy chords in selection to clipboard.\n^c\tCopy melody and chords in selection to clipboard.\n \n d\tTranspose selected melody down 1/2 step.\n D\tTranspose selected chords down 1/2 step.\n^d\tTranspose selected melody and chords down 1/2 step.\n\n e\tTranspose selected melody up 1/2 step.\n E\tTranspose selected chords up 1/2 step.\n^e\tTranspose selected melody and chords up 1/2 step.\n\n f\tMove selection forward to next grid line.\n\n g\tTranspose selected melody down one octave.\n ^g\tOpen the Lick Generator Controls.\n\n i\tStart playback of entire sheet.\n^i\tOpen voicing editor.\n\n j\tCopy melody of selection to text window.\n J\tCopy chords of selection to text window.\n^j\tCopy chords and melody of selection to text window.\n\n k\tStop playback.\n^k\tOpen piano keyboard.\n\n^l\tPerform one-time auto-layout adjustment.\n\n M\tMark advice cell, idiom, lick, or quote.\n m\tUnmark advice cell, idiom, lick, or quote.\n\n^n\tStart a new leadsheet in addition to the current one.\n\n^o\tOpen another leadsheet in place of the current one.\n\n p\tOpen preferences dialog.\n^p\tPrint leadsheet.\n\n^q\tQuit Impro-Visor.\n\n r\tAdd  a rest at selected grid line.\n R\tRectify melody to the chordal harmony.\n^r\tRevert file to previous save.\n\ns\tTranspose down harmonically.\n^s\tSave leadsheet file.\n\n t\tTranspose selected melody up one octave.\n \n u\tSave selection in the vocabulary as a cell, lick, idiom, or quote.\n\n v\tPaste melody from clipboard.\n V\tPaste chords from clipboard.\n^v\tPaste melody and chords from clipboard.\n\nw\tTranspose up harmonically.\n^w\tWrite leadsheet file as a specified name.\n\n x\tCut melody in selection, saving to clipboard.\n X\tCut chords in selection, saving to clipboard.\n^x\tCut melody and chords in selection, saving to clipboard.\n\n y\tRedo undone command.\n\n z\tUndo previous command.\n\n /\tReverse melody in selection.\n \\\tInvert melody in selection.\n\n");
        alphaCommandPane.setViewportView(alphaCommandList);

        helpTabbedPane.addTab("Keys", alphaCommandPane);

        melodyNotation.setToolTipText("Melody notation");
        melodyNotation.setMinimumSize(new java.awt.Dimension(500, 800));
        melodyNotation.setPreferredSize(new java.awt.Dimension(600, 900));

        melodyNotationHelp.setColumns(20);
        melodyNotationHelp.setFont(new java.awt.Font("Lucida Console", 0, 13));
        melodyNotationHelp.setRows(5);
        melodyNotationHelp.setText("Help for the Melody Part of Leadsheet Notation\n\nNote: Melody notation is case-sensitive.\n\nNotes must begin with a lower-case letter: a, b, c, d, e, f, g.\n\nA modifier # (sharp) or b (flat) may follow optionally.\n\nNotes are in the octave middle c and just above. \nTo specify a higher octave add a plus (+) for each octave. \nTo specify a lower octave add a minus (-) for each octave lower.\n\nThe duration of a note is specified by numbers:\n\n    1  = whole note\n    2  = half note\n    4  = quarter note\n    8  = eighth note\n    16 = sixteenth note\n    32 = thirty-second note\n\nFollowing a number by a dot (.) multiplies the value by 1.5. \n\nFollowing a number by /3 gives the value of a triplet (2/3 of the original value).\n\nDurations can be augmented by following a basic duration with a plus (+)\nthen the added duration.\n\nIf no duration is specified, an eighth note will be used.\n\nExamples:\n\n    a8    an 'a' above middle c, eighth note\n    eb8   an e-flat above middle c, eighth note\n    d+4   a 'd' in the second octave above middle c, quarter note\n    g-4/3 a 'g' in the octave below middle c, quarter-note triplet\n    c#4.  a c-sharp in the octave above middle c, dotted quarter note\n    f+2+8 an f in the second octave above middle c, half note plus an eighth\n\nTo see how any given note can be rendered in this notation, \nenter it in the GUI using point-and-click,\nthen use j to transfer it to the text entry field.\n\n");
        melodyNotation.setViewportView(melodyNotationHelp);

        helpTabbedPane.addTab("Melody", melodyNotation);

        chordListingPane.setToolTipText("Listing of Available Chords");
        chordListingPane.setMinimumSize(new java.awt.Dimension(500, 800));
        chordListingPane.setPreferredSize(new java.awt.Dimension(600, 900));

        chordList.setColumns(20);
        chordList.setEditable(false);
        chordList.setFont(new java.awt.Font("Lucida Console", 0, 13));
        chordList.setRows(5);
        chordList.setText("These are the chord definitions supplied in the current release. \nIf you add your own chord definitions, they will not appear here.\n\nNote: Chord notation is case-sensitive.\n\nWe use root C, but any root may be used. The acceptable roots are:\nA, B, C, D, E, F, G, each of which may be followed by # (sharp) or b (flat).\n\nSlash chords (with bass other than the root) are allowed, e.g. Cm7/D means\nCm7 over a D bass. (The bass note may or may not be in the chord already.)\n\nPolychords use back-slash, e.g. Ab\\C7 means an Ab chord over a C7 chord.\n\nMajor Chords\n\nC.............. same as CM\nCM............. C major (c e g)\nC2............. same as CMadd9\nC4............. C four (c f bb)\nC5............. C five (c g)\nC6............. same as CM6\nC69............ same as CM69\nCM13#11........ C major thirteen sharp eleven (c e g b d f# a)\nCM13........... C major thirteen (c e g b d a)\nCM6............ C major six (c e g a)\nCM69#11........ C major six nine sharp eleven (c e g a d f#)\nCM69........... C major six nine (c e g a d)\nCM7#11......... C major seven sharp eleven (c e g b f#)\nCM7............ C major seven (c e g b)\nCM7add13....... C major seven add 13 (c e g a b d)\nCM7b5.......... C major seven flat five (c e gb b)\nCM7b6.......... C major seven flat six (c e g ab b)\nCM7b9.......... C major seven flat nine (c e g b db)\nCM9#11......... C major nine sharp eleven (c e g b d f#)\nCM9............ C major nine (c e g b d)\nCM9b5.......... C major nine flat five (c e gb b d)\nCMadd9......... C major add nine (c e g d)\nCMb5........... C major flat five (c e gb)\nCMb6........... C major flat six (c e ab)\nCadd2.......... same as CMadd9\nCadd9.......... same as CMadd9\n\nMinor Chords\n\nCm#5........... C minor sharp five (c eb g#)\nCm+............ same as Cm#5\nCm............. C minor (c eb g)\nCm11#5......... C minor eleven sharp five (c eb ab bb d f)\nCm11........... C minor eleven (c eb g bb d f)\nCm11b5......... C minor eleven flat five (c eb bb gb d f)\nCm13........... C minor thirteen (c eb g bb d f a)\nCm6............ C minor six (c eb g a)\nCm69........... C minor six nine (c eb g a d)\nCm7#5.......... C minor seven sharp five (c eb ab bb)\nCm7............ C minor seven (c eb g bb)\nCm7b5.......... C minor seven flat five (c eb gb bb)\nCh............. same as Cm7b5 (h for \"half-diminished\")\nCm9#5.......... C minor nine sharp five (c eb ab bb d)\nCm9............ C minor nine (c eb g bb d)\nCm9b5.......... C minor nine flat five (c eb bb gb d)\nCmM7........... C minor major seven (c eb g b)\nCmM7b6......... C minor major seven flat six (c eb g ab b)\nCmM9........... C minor major nine (c eb g b d)\nCmadd9......... C minor add nine (c eb g d)\nCmb6........... C minor flat six (c eb ab)\nCmb6M7......... C minor flat six major 7 (c eb ab b)\nCmb6b9......... C minor flat six flat nine (c eb ab db)\n\nAugmented Chords\n\nCM#5........... C major sharp five (c e g#)\nC+............. same as CM#5\nCaug........... same as CM#5\nC+7............ same as C7#5\nCM#5add9....... C major sharp five add 9 (c e g# d)\nCM7#5.......... C major seven sharp five (c e g# b)\nCM7+........... same as CM7#5\nCM9#5.......... C major nine sharp five (c e g# b d)\nC+add9......... same as CM#5add9\n\nDominant Chords\n\nC7............. C seven (c e g bb)\nC7#5........... C seven sharp five (c e g# bb)\nC7+............ same as C7#5\nCaug7.......... same as C7#5\nC7aug.......... same as C7#5\nC7#5#9......... C seven sharp five sharp nine (c e g# bb d#)\nC7alt.......... same as C7#5#9\nC7b13.......... C seven flat thirteen (c e g bb ab)\nC7b5#9......... same as C7#9#11\nC7b5........... C seven flat five (c e gb bb)\nC7b5b13........ same as C7#11b13\nC7b5b9......... same as C7b9#11\nC7b5b9b13...... same as C7b9#11b13\nC7b6........... C seven flat six (c e g ab bb)\nC7b9#11........ C seven flat nine sharp eleven (c e g bb db f#)\nC7b9#11b13..... C seven flat nine sharp eleven flat thirteen (c e g bb db f# ab)\nC7b9........... C seven flat nine (c e g bb db)\nC7b9b13#11..... C seven flat nine flat thirteen sharp eleven (c e g bb db f# ab)\nC7b9b13........ C seven flat nine flat thirteen (c e g bb db ab)\nC7no5.......... C seven no five (c e bb)\nC7#11.......... C seven sharp eleven (c e g bb f#)\nC7#11b13....... C seven sharp eleven flat thirteen (c e g bb f# ab)\nC7#5b9#11...... C seven sharp five flat nine sharp 11 (c e g# bb db f#)\nC7#5b9......... C seven sharp five flat nine (c e g# bb db)\nC7#9#11........ C seven sharp nine sharp eleven (c e g bb d# f#)\nC7#9#11b13..... C seven sharp nine sharp eleven flat thirteen (c e g bb d# f# ab)\nC7#9........... C seven sharp nine (c e g bb d#)\nC7#9b13........ C seven sharp nine flat thirteen (c e g bb d# ab)\n\nC9............. C nine (c e g bb d)\nC9#5........... C nine sharp five (c e g# bb d)\nC9+............ same as C9#5\nC9#11.......... C nine sharp eleven (c e g bb d f#)\nC9#11b13....... C nine sharp eleven flat thirteen (c e g bb d f# ab)\nC9#5#11........ C nine sharp five sharp eleven (c e g# bb d f#)\nC9b13.......... C nine flat thirteen (c e g bb d ab)\nC9b5........... C nine flat five (c e gb bb d)\nC9b5b13........ same as C9#11b13\nC9no5.......... C nine no five (c e bb d)\n\nC13#11......... C thirteen sharp eleven (c e g bb d f# a)\nC13#9#11....... C thirteen sharp nine sharp eleven (c e g bb d# f# a)\nC13#9.......... C thirteen sharp nine (c e g bb d# a)\nC13............ C thirteen (c e g bb d a)\nC13b5.......... C thirteen flat five (c e gb a bb)\nC13b9#11....... C thirteen flat nine sharp eleven (c e g bb db f# a)\nC13b9.......... C thirteen flat nine (c e g bb db a)\n\nSuspensions\n\nCMsus2......... C major sus two (c d g)\nCMsus4......... C major sus four (c f g)\nCsus2.......... same as CMsus2\nCsus4.......... same as CMsus4\nCsusb9......... C sus flat nine (c db f g)\nC7b9b13sus4.... same as C7sus4b9b13\nC7b9sus........ same as C7susb9\nC7b9sus4....... same as C7sus4b9\nC7b9sus4....... same as C7susb9\nC7sus.......... same as C7sus4\nC7sus4......... C seven sus four (c f g bb)\nC7sus4b9....... C seven sus four flat nine (c f g bb db)\nC7sus4b9b13.... C seven sus four flat nine flat thirteen (c f g bb db ab)\nC7susb9........ C seven sus flat nine (c db f g bb)\nC9sus4......... C nine sus four (c f g bb d)\nC9sus.......... same as C9sus4\nC11............ C eleven (c e g bb d f)\nC13sus......... same as C13sus4\nC13sus4........ C thirteen sus four (c f g bb d a)\n\nMiscellaneous\n\nCBlues......... C Blues (c eb f gb g bb) (Use upper case to avoid confusion with Cb = C flat)\nCBass.......... C Bass (c) (Use upper case to avoid confusion with Cb = C flat)\n");
        chordListingPane.setViewportView(chordList);

        helpTabbedPane.addTab("Chords", chordListingPane);

        lickGenSettingsPane.setMinimumSize(new java.awt.Dimension(500, 800));
        lickGenSettingsPane.setPreferredSize(new java.awt.Dimension(600, 900));

        lickGenSettings.setColumns(20);
        lickGenSettings.setFont(new java.awt.Font("Lucida Console", 0, 13));
        lickGenSettings.setRows(5);
        lickGenSettings.setText("Help for the Lick Generator\n\nThe lick generator and triage tool is a powerful and customizable\nutility that will create original licks over a given series of chord\nchanges.\n\nThe lick generator creates things in two steps; first, it generates\na rhythm using a context-free grammar.  Then, it fills in this\nrhythm probabilistically.  This allows for a large variety of \ndifferent melodys.  The grammar is specified in the text field under\n\"Grammar File.\"  This file is customizable and uses the following\nformat for terminal values:\n\n<Note type><Value>\n\nNote type can be one of\n     * X - any note\n     * R - a rest\n     * C - a chord tone (as specified in the vocabulary file)\n     * L - a color tone (as specified in the vocabulary file)\n     * S - a scale tone (as specified by the user.  If \"None\" is chosen, \n\tthis is ignored.  If use first scale is chosen, it looks\n\tat the first scale in the vocabulary file associated \n\twith the given chord.  If there is no such scale, this\n\tis ignored).\n     * A - an approach tone (forces the following note to be a\n \tchord tone, and approaches from a half step\n\tabove or below).\n\nValue can be from 1 (4 beats) to 16/3 (sixteenth note triplets).  \nLonger note values are not currently supported in the grammar.\n\nFor a more detailed explanation of how to modify the grammar\nfile, please see the \"Lick Generator\" tutorial.\n\nIf you do not wish to use the context-free grammar to generate a\nrhythm, deselect the \"Use Grammar\" button.  This tends to create\nless listenable fragments, however.\n\nBy default, the lick generator will tend to avoid repeating the same\nnote multiple times in a row.  If you would like to turn this off,\ndeselect the \"Avoid Repeat Pitch\" button.\n\n\"Generate\" creates a rhythm and fills it in using the probabilities.\n\n\"Generate Rhythm\" only creates a rhythm.\n\n\"Fill Melody\" generates a melody for a given rhythm (the rhythm\nis specified in the large text box; note that you can manually enter\nlonger note values here using leadsheet notation, as in X2+4 for\na three beat note)\n\n\"Get Selected Rhythm\" will read the rhythmic pattern of whatever\nis currently selected.\n\n\"Replay\" replays the current selection.\n\n\"Help\" displays this dialog.\n\n\"Reload\" will re-parse the grammar file.\n\n\"Save Lick\" saves the lick into the vocabulary.\n\nThe lick generator will automatically determine note probabilities \nfor all chords in the from the current selection start up to the\ntotal number of beats specified.  If you would like to disable this\nfeature, deselect the \"Auto-fill probabilities\" check box.  The\n\"Fill\" button will reset them to their defaults, and the \"Clear\" button\nsets them all to zero.\n\nOther options:\n     * Min/Max Pitch: Do not use pitches higher or lower than these\n\tvalues.\n\n     * Min/Max Interval: Do not jump higher or lower than this interval\n\tunless a jump probability is set.\n\n     * Min/Max Duration (only used if the grammar is disabled): Do\n\tnot generate notes with rhythmic values longer or\n\tshorter than these; note that these are inverse, so\n\t32 indicates a 32nd note and 1 indicates a whole note.\n\n     * Beats: The length of the lick to generate in beats.  This value is \n\tbased off of the current selection.\n\n     * Rest Probability (only used if the grammar is disabled): The\n\tprobability of a given note being a rest.\n\n     * Leap Probability: The probability of jumping outside the\n\tmaximum interval (see above).");
        lickGenSettingsPane.setViewportView(lickGenSettings);

        helpTabbedPane.addTab("Lick Generator", lickGenSettingsPane);

        styleHelpPane.setMinimumSize(new java.awt.Dimension(500, 800));
        styleHelpPane.setPreferredSize(new java.awt.Dimension(600, 900));

        styleHelpList1.setColumns(20);
        styleHelpList1.setFont(new java.awt.Font("Lucida Console", 0, 13));
        styleHelpList1.setRows(5);
        styleHelpList1.setText("Help for Style Notation\n\nStyles are responsible for Impro-Visor's playback accompaniment.  Styles \nare specified in the vocabulary file as a set of patterns for each instrument\nof the accompaniment.  There are also style parameters that determine how\nthe patterns are used.\n\nPatterns\n\nEach pattern is defined by a set of rules.  The rules are similar to\nleadsheet notation, except the pitch is replaced with a capital letter\nindicating the rule.  Each pattern also has a weight that determines how\noften that pattern is used in relation to other patterns of the same length.\n\nChord Patterns\n\nChord patterns determine only the rhythm of the chord accompaniment. (The \nvoicings to use are decided based on a voice-leading algorithm.)\n\nChord patterns use the following rules:\n\nX       Strike the chord\nR       A rest\n\nBass Patterns\n\nBass patterns determine both the rhythm of the bassline and the type of\nnotes that are chosen.\n\nBass patterns use the following rules, where d is a duration, such as\n4 for a quarter-note, 8 for an eighth-note, etc.\n\nBd      The bass note (either the root of the chord, or the note specified\n        as part of a slash chord)\n\nCd      A note from the current chord\n\nSd      A note from the first scale associated with the current chord\n\nAd      A tone that approaches the bass note of the next chord\n\nNd      The bass note of the next chord (if at the end of a pattern\n        it will tie over to the next pattern)\n\nRd      A rest of duration d\n\n=d      The same note as the previous note, ignoring rests.\n\n(X n d) A specific note from the first scale given for a chord in\n        the vocabulary. For example (X 5 4) will give a quarter-note\n        on the fifth-degree of the scale.\n\n(X bn d) or (X #n d)\n        A specific note from the first scale given for a chord in\n        the vocabulary, lowered or raised a half step using standard\n        flat/sharp notation.  For example (X b5 4) will give a\n        quarter-note on a half step below the fifth-degree of the scale.\n\nU/D notation\n        When inputting multiple notes into a bass pattern, placing\n        U or D between notes will guarantee a rise or drop from the\n        first note to the next.  For example, B4 U C4 D (X 2 4)\n        will give a bass note, followed by an ascending color tone,\n        followed by a descending second-degree note.       \n\n\nDrum Patterns\n\nDrum patterns are a bit more complicated in that for one pattern you must\nspecify a drum \"rule\" for each drum you want in the pattern.  Here is the\nformat for a drum rule specification:\n\n(drum DRUM-MIDI-NUMBER RULE RULE ...)\n\nDrum patterns use the following rules:\n\nX       Strike the drum\nR       A rest\n\nGeneral MIDI Drum Numbers:\n\n35      Acoustic Bass Drum      59      Ride Cymbal 2\n36      Bass Drum 1             60      Hi Bongo\n37      Side Stick              61      Low Bongo\n38      Acoustic Snare          62      Mute Hi Conga\n39      Hand Clap               63      Open Hi Conga\n40      Electric Snare          64      Low Conga\n41      Low Floor Tom           65      High Timbale\n42      Closed Hi-Hat           66      Low Timbale\n43      High Floor Tom          67      High Agogo\n44      Pedal Hi-Hat            68      Low Agogo\n45      Low Tom                 69      Cabasa\n46      Open Hi-Hat             70      Maracas\n47      Low-Mid Tom             71      Short Whistle\n48      Hi-Mid Tom              72      Long Whistle\n49      Crash Cymbal 1          73      Short Guiro\n50      High Tom                74      Long Guiro\n51      Ride Cymbal 1           75      Claves\n52      Chinese Cymbal          76      Hi Wood Block\n53      Ride Bell               77      Low Wood Block\n54      Tambourine              78      Mute Cuica\n55      Splash Cymbal           79      Open Cuica\n56      Cowbell                 80      Mute Triangle\n57      Crash Cymbal 2          81      Open Triangle\n58      Vibraslap\n\nStyle Parameters\n\nname            The name of the style\nswing           The swing value for the style\ncomp-swing\tThe swing value for the accompaniment parts of the style\nbass-high       The highest note in the bass's range\nbass-low        The lowest note in the bass's range\nbass-base       A note that specifies the starting area for the bassline\nchord-high      The highest note in the chord's range\nchord-low       The lowest note in the chord's range\nvoicing-type    Sets the voicing type to be used\n\nExample Style\n\n(style\n    (name swing)\n    (swing 0.67)\n    (comp-swing 0.67)\n    \n    (bass-high g-)\n    (bass-low g---)\n    (bass-base c--)\n    \n    (bass-pattern (rules B4 S4 C4 A4) (weight 10))\n    (bass-pattern (rules B4 C4 C4 A4) (weight 5))\n    (bass-pattern (rules B4 S4 C4 S4) (weight 3))\n    (bass-pattern (rules B4 S4 C4 A8 A8) (weight 3))\n    (bass-pattern (rules B4 S4 C4 S8 A8) (weight 3))\n    (bass-pattern (rules B4 C4) (weight 5))\n    (bass-pattern (rules B4 C8 A8) (weight 5))\n    (bass-pattern (rules B4 S4) (weight 3))\n    (bass-pattern (rules B4) (weight 5))\n    (bass-pattern (rules B4 A4) (weight 2))\n    \n    (drum-pattern\n        (drum 51 X4 X8 X8 X4 X8 X8)\n        (weight 10)\n        )\n    (drum-pattern\n        (drum 51 X4 X8 X8)\n        (weight 10)\n        )\n    (drum-pattern\n        (drum 51 X4)\n        (weight 10)\n        )\n        \n    (voicing-type closed)\n    (chord-high a)\n    (chord-low c-)\n    \n    (chord-pattern (rules X1) (weight 7))\n    (chord-pattern (rules X2) (weight 7))\n    (chord-pattern (rules X4) (weight 7))\n    (chord-pattern (rules X2+4 X4) (weight 5))\n    (chord-pattern (rules X4 R2+4) (weight 5))\n    (chord-pattern (rules X2 R2) (weight 7))\n    (chord-pattern (rules R4) (weight 1))\n    (chord-pattern (rules R8 X8+4 X4 R4) (weight 3))\n    (chord-pattern (rules R4 X8+4 X8 R4) (weight 5))\n    (chord-pattern (rules X8+2 X4 X8) (weight 2))\n    )\n\nStyle Tips\n\n   * The lengths of the patterns are important.  The software will attempt\n     to fill space with the largest pattern it can.  Try to correspond pattern\n     lengths to the probable chord durations.  If chords will mostly last for\n     4 beats, then have a 4 beat pattern.  If chords will last for 8 beats,\n     the software can fill that in with two 4 beat patterns.  Having a 1 beat\n     pattern for each accompaniment instrument is a good idea as a failsafe\n     for unconventional chord durations.\n\n   * Adding the parameter (no-style) to your style will cause the software\n     to leave out any bassline or drum part and play chords exactly where \n     they are specified on the leadsheet.\n\n   * Look to the styles included in the vocabulary file as a guide to\n     creating your own styles.\n\n   * Don't be afraid to experiment, but also don't be afraid to keep \n     things simple.\n");
        styleHelpPane.setViewportView(styleHelpList1);

        helpTabbedPane.addTab("Style", styleHelpPane);

        drawingHelpPane.setMinimumSize(new java.awt.Dimension(500, 800));
        drawingHelpPane.setPreferredSize(new java.awt.Dimension(600, 900));

        drawingHelp.setColumns(20);
        drawingHelp.setFont(new java.awt.Font("Lucida Console", 0, 13));
        drawingHelp.setRows(5);
        drawingHelp.setText("Help for Using the Draw (pencil) Tool\n\nThe Draw (pencil) tool allows you to input notes quickly by dragging the \nmouse continuously over the stave.  This makes it easy to sketch out \nthe 'melody contour' of your solo fluidly, without having to click at each\nindividual space.\n\nNote Fitting\n\nThe Draw tool does its best to fit notes along the curve you draw.  That is,\nit will add the pitch that roughly correponds to the stave note under\nthe cursor.  Since a melody contour defines the shape of the pitches\nin the music - but not necessarily specific pitches - the Draw tool allows\nyou to ignore harmonic rules when sketching out this shape; it will match\npitches to the nearest harmonious ones, for the current chord.  When\nno chord (\"NC\") is in effect, the Draw tool fits notes using the major\nscale of the score's key.\n\nNote Duration\n\nThe duration of notes on the drawn contour is determined by the note-\nspacing you can set below each measure.  If you want a triplet, for \nexample, in a particular measure, you can simply set the rhythm there\n(by dragging out the note spacing) and draw over that measure.  Notes\nwill automatically be fitted along the curve you draw, to that rhythm.\n\nDrawing Tips\n\n   * You can extend a note while drawing by holding the Shift key.  This\n     will 'flatline' the melody contour and increase the duration of the\n     current note being drawn. \n\n   * To add rest while drawing, you can hold the Control key.  Drawing\n     over the stave with Control down will insert rest there.  You may\n     also press 'R' while a given note is selected to insert rest there.\n\n   * When drawing over chord changes, you may want to force a tone\n     that 'approaches' the change before a given chord.  By holding\n     Shift-A, the Draw tool will always add an approach tone before a\n     chord change, and then resolve to the nearest chord tone.\n\n   * If you draw too quickly, the tool might \"miss\" a note, and not fit\n     it to the curve right away.  Don't panic!  Any notes that aren't fitted\n     properly will conform to the curve once you release the mouse button.\n\n   * Post-edit!  If you want to change a note or two, edit them after you\n     finish sketching.  Adjusting the pitch is easy; just drag up and down\n     on a note.  Using the keyboard controls, it's also easy to add rest\n     or extend notes afterwards.\n\n   * Want to hear the notes as they're being drawn?  Unmute the entry\n     sounds on the mixer, and Impro-Visor will remember your \n     preference during this session.  If you always want to hear them\n     by default, you may toggle the default settings under \n     \"Preferences -> Contour Drawing\".\n\n   * Maybe you only want the Draw tool to add chord tones or color\n     tones, rather than all scale tones.  Impro-Visor allows you to \n     set the Draw tool pitches under \"Preferences -> Contour Drawing\".\n");
        drawingHelpPane.setViewportView(drawingHelp);

        helpTabbedPane.addTab("Drawing", drawingHelpPane);

        roadmapHelpPane.setMinimumSize(new java.awt.Dimension(500, 800));
        roadmapHelpPane.setPreferredSize(new java.awt.Dimension(600, 900));

        roadmapHelp.setColumns(20);
        roadmapHelp.setFont(new java.awt.Font("Lucida Console", 0, 13));
        roadmapHelp.setRows(5);
        roadmapHelp.setText("Help for Using the Roadmap Mode\n\nUsing Roadmaps\n\nRoadmaps allow for viewing and manipulation of a leadsheet from a larger\nperspective, focused on the chord progressions that make up a given song.\nUsing a roadmap makes it fast and easy to move and transpose whole chords\nand chord sequences, and to visualize the structure of a song in terms of\n\"bricks\", or common chord sequences used to construct jazz tunes.\n\nOpening a Roadmap\n\nWhen you wish to open a road map, you have a choice of how it will open:\n\n   * if you only want an empty roadmap, you can type Ctrl-';' to open a\n     roadmap describing a blank leadsheet.\n\n   * if you want a roadmap containing the chords of the song you have\n     open, press ';' and a roadmap will open with all the chords from \n     the currently active leadsheet. \n\n   * if you want a roadmap with your current song, but converted into\n     bricks, press Shift-';' and a roadmap will generate containing the\n     chords of the current leadsheet grouped together as chord bricks.\n\nAll of these options are also available by opening the Roadmap menu on a \nleadsheet.\n\nIf you want a roadmap to open whenever you open a leadsheet, you can go to\nthe Roadmap menu and click \"Generate roadmap on Opening Leadsheet\" to enable the\nsetting. When this option is checked, any time a leadsheet is opened a \ncorresponding roadmap will open with the chords grouped into bricks.\n\nWhen a roadmap is open, you can use the File -> Open Leadsheet option to\nselect a different leadsheet to roadmap. Alternately, if you want to navigate\nthrough a series of files in one directory, you can use the arrows just below\nthe File menu to step back and forth between roadmaps based on alphabetical \nordering of the leadsheet file names.\n\nIf you have modified a roadmap and wish to convert it back into an appropriate\nleadsheet, you can use the Leadsheet menu to either put the selected chords \n(or all the chords if none are selected) into a new leadsheet or append them to\nthe current leadsheet.\n\n \nReading a Roadmap\n\nIn the primary pane of a roadmap window, you can see a graphical representation \nof the chords from an opened leadsheet (or no chords at all). The chords will\nbe displayed as a list of \"blocks\": either individual chords or chords grouped\ntogether into \"bricks\".\n\nThere are three levels to a road map: the key level, the block level, and the \nchord level. At the top level is a color-coded key map, which shows the general\nkey at a certain point in a tune. The coloration is based upon position around\nthe circle of fifths; the nearer two colors are in the spectrum, the closer they\nare in the circle of fifths. If the key is minor or dominant rather than major,\nit takes the color of its relative major counterpart. If you don't like the \ncoloration, you can always go to File -> Roadmap Information and uncheck \"Key\nColoration\".\n\nNext, at the block level, one can see the names of any bricks present. An \nunanalyzed piece will have no names here, as everything will be broken into\nchords. When analyzed, the names of bricks grouping these chords together \nwill appear in the middle bar if any such grouping exists. If a brick overlaps\nanother brick, a \"+ ...\" will appear. If insufficient space exists to display\nthe brick's full name, you'll just see a \"...\". To see the full name, mouse \nover the brick.\n\nFinally, the chords themselves are shown at the bottom level with their durations.\nThese can be any chords accepted by Impro-Visor itself, and will usually be pulled\nfrom the leadsheet open in Impro-Visor's main window.\n\nSometimes, below the end of a brick, a yellow box with a word will appear. This\ndescribes the kind of \"join\" that exists between two blocks. Joins are named \nbased upon the interval between the key of two blocks:a Homer joins two bricks \nin the same key, a Cherokee joins two bricks with the second a half-step up from\nthe first, , a Woody joins two bricks a whole step apart, etc. The list of all \njoins in order based on number of half-steps up the second key is from the\nfirst key is: \n         0: Homer (same key)           6:  Stella (tritone)\n         1: Cherokee (half step up)    7:  Backslider (fourth down)\n         2: Woody (whole step up)      8:  Half Nelson (major third down)\n         3: Highjump (minor third up)  9:  Sidewinder (minor third down)\n         4: Bauble (major third up)    10: New Horizon (whole step down)\n         5: Bootstrap (fourth up)      11: Downwinder (half step down)\n\nThese joins will only appear between a brick ending in a stable chord and a \nbrick beginning in an unstable chord, so don't be surprised if there are\nnot joins between all bricks.\n\nEnds of blocks will sometimes have a doubled line. This indicates that the\nblock is the end of a section (two thick lines) or a phrase (a thin line and a\nthick line). Sections and phrases are notated in a leadsheet file with the \nparenthetical expressions \n  (section (style = [style name]))\nand\n  (phrase)\nrespectively. These help both to display the roadmap in a way that keeps\nsections distinct and to keep analysis from making bricks that overlap two\nsections or phrases.\n\nIf you wish to change the width of the contents of the roadmap, you can use\nthe Feature Width slider on the top toolbar to make the contents more easily\nviewable. If brick names are difficult to view due to the feature width, you\ncan mouse over difficult-to-view bricks and the full name will show.\n\n\nBrick Dictionary\n\nThe Brick Dictionary contains a list of possible bricks for you to use in\na given piece. This also is the list of possible bricks that could appear in\nthe analyzed version of a piece. Each brick has a type which describes the\npurpose that brick serves in a given piece: sometimes, a \"Cadence\", for \ninstance, starts from an unresolved chord and progresses to a resolution.\n\nYou can select a brick in the dictionary by navigating through the tree, first\nlooking for the type, then the brick name. Sometimes, a brick will have several\nvariants; in this case, you can either select the folder with that name to get\nthe default, or you can open the folder to view one of the brick variants.\n\nWhen a brick is selected, it displays in the Brick Preview pane as it would if\nit were inserted into the roadmap. From there, one can use the drop-down menus\nbelow the dictionary to select the key of a given brick or the relative duration\nof the brick. When one is satisfied with the appearance of a given brick, one \ncan drag it from the brick preview pane to the desired location in the current \nroadmap to insert it.\n\nIf you don't want to see a brick in the library or on the roadmap, you can \nselect the brick in the tree and then press the \"Delete Selected Library Brick\"\nbutton. This will take the brick out of the visible library. Careful when you\ndelete a brick, though: if you want to restore it in the dictionary, you will\nneed to open the BrickDictionary.txt file in the \"vocab\" folder of the \nImpro-Visor application, find the definition, and change the word \"Invisible\"\nback to the correct brick type.\n\n\nManipulating the Roadmap\n\nIn order to change either parts or the entirety of the roadmap, you have to \nselect the parts of the roadmap you wish to change. You can select these parts\nby clicking on them. To select a single block, click on it. To select multiple,\nclick on the starting block, then hold Shift and click on the ending block. All\nthe blocks from the first to the second will be selected. If you wish to select\nthe entire leadsheet, type \"A\" or click \"Select All\" in the Edit menu..\n\nWhen you have a selection, you can perform several transformations on the \nselected block(s):\n\n   * To transpose the key up a semitone, press \"E\"; to transpose it down a \n     semitone, press \"D\".\n\n   * You can change the duration of a given selection by selecting the \"Scale\n     Duration\" menu in the top toolbar. It will scale the selection to the \n     given fraction or multiple of the current duration.\n\n   * You can cut or copy a set of chords by pressing \"X\" or \"C\", respectively.\n     These can then be pasted before a selection (or at the end of the chord\n     sequence if there is no selection) by typing \"V\" later. These operations \n     are also all available in the Edit menu.\n\n   * To delete the selection, press the Delete/Backspace key. You can also\n     delete selections from the Edit menu.\n\n   * You can undo a modification by pressing \"Z\". If you wish to redo the \n     operation, pressing \"Y\" will return the roadmap to the state before the\n     undo. These operations are also available in the Edit menu.\n\n   * You can modify a particular chord by clicking on the chord name itself\n     within a selection. If you double-click the chord, you can change its name\n     and duration. Only valid chord names will be accepted. Changing a chord in\n     a brick will break the brick up.\n\n   * To \"break\" a selection into the blocks that make it up, click on the \n     \"Break\" button in the top toolbar, or select \"Break Selection\" in the \n    Edit menu. \n\n   * To \"flatten\" a selection into the chords that make it up, click on the\n     \"Flatten button in the top toolbar, or select \"Flatten Selection\" in the\n     Edit menu.\n\n   * To add a selection as a new brick in the Brick Library, click the \"New\n     Brick\" button in the top toolbar. This will open a dialog window where you\n     can name the brick and select its key, type, and mode.\n\n   * One of the most useful tools in the roadmap is the Analyze button, which \n     will take the whole piece or a selection and split it into the best \n     combination of bricks it can find. Generally, this will take a few seconds,\n     so be patient. If you aren't happy with the resulting bricks, try taking \n     selections from what you want to analyze and analyzing them individually,\n     or redefining where section divisions are in the roadmap.\n\n   * To change whether or not a given selection ends a section, you can type\n     Return or click \"Toggle Section\" in the Section menu. Alternatively, if you\n     wish for the selection to be the end of a phrase, you can type Shift+Return\n     or click \"Toggle Phrase\" in the Section menu. A brick can end either a \n     section or a phrase, but not both.\n\nAdditionally, the Roadmap supports playback of a given selection. If you press\nthe \"play\" button (the triangle on the top toolbar), a MIDI matching the chords\nfor a given section and the style on the leadsheet will play. Hitting the \"stop\"\nbutton (the square on the top toolbar) will stop playback, and one can toggle\nwhether the playback will loop or not by clicking the \"Loop\" button on the top\ntoolbar. If nothing is selected, playback will default to the whole of the tune.\n\n\n");
        roadmapHelpPane.setViewportView(roadmapHelp);

        helpTabbedPane.addTab("Roadmap", roadmapHelpPane);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        getContentPane().add(helpTabbedPane, gridBagConstraints);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                HelpDialog dialog = new HelpDialog(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea alphaCommandList;
    private javax.swing.JScrollPane alphaCommandPane;
    private javax.swing.JTextArea chordList;
    private javax.swing.JScrollPane chordListingPane;
    private javax.swing.JTextArea drawingHelp;
    private javax.swing.JScrollPane drawingHelpPane;
    private javax.swing.JScrollPane helpByTopic;
    private javax.swing.JTextArea helpByTopicList;
    private javax.swing.JTabbedPane helpTabbedPane;
    private javax.swing.JTextArea lickGenSettings;
    private javax.swing.JScrollPane lickGenSettingsPane;
    private javax.swing.JScrollPane melodyNotation;
    private javax.swing.JTextArea melodyNotationHelp;
    private javax.swing.JTextArea roadmapHelp;
    private javax.swing.JScrollPane roadmapHelpPane;
    private javax.swing.JTextArea styleHelpList1;
    private javax.swing.JScrollPane styleHelpPane;
    // End of variables declaration//GEN-END:variables

}
